{% extends 'adminlte/lib/base.html' %}
{% load adminlte_extras %}

{% block content %}
    <form id="listForm">
        <div class="box">
            {% search_form %}

            <div class="box-body">
                <table class="table table-bordered dataTable">
                    <thead>
                    <tr>
                        {% order_th name="#" field="id" %}
                        {% order_th name="CODE" field="codename" %}
                        {% order_th name="CODE" field="codename" %}
                        <th>-</th>
                    </tr>
                    </thead>
                    {% for permission in pager.items %}
                        <tr data-id="{{ permission.id }}">
                            <td>
                                <a href="{% url 'adminlte.permission.edit' pk=permission.id %}">{{ permission.id }}</a>
                            </td>
                            <td>{{ permission.codename }}</td>
                            <td>{{ permission.name }}</td>
                            <td>
                                {% confirm_btn view_name="adminlte.permission.delete" pk=permission.id %}
                            </td>
                        </tr>
                    {% endfor %}
                </table>
            </div>
            <!-- /.box-body -->
            <div class="box-footer clearfix">
                {% pagination %}
            </div>
        </div>
    </form>
{% endblock %}
